package org.qiyu.live.user.provider;


import jakarta.annotation.Resource;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.qiyu.live.user.interfaces.dto.UserDTO;
import org.qiyu.live.user.provider.service.IUserService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * 用户中台启动类
 */


@SpringBootApplication
@EnableDiscoveryClient
@EnableDubbo
public class UserProviderApplication implements CommandLineRunner{

    @Resource
    private IUserService userService;

    public static void main(String[] args) {
        SpringApplication.run(UserProviderApplication.class,args);
    }

    @Override
    public void run(String... args) throws Exception {
        UserDTO userDTO = new UserDTO();
        userDTO.setUserId(11113L);
        userDTO.setNickName("zhangsan111");
        userService.updateUserInfo(userDTO);

    }
}
